package vue;

import java.awt.Dimension;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JPanel;

import controleur.ControleBtnChoice;

import modele.CKModel;

public class PanelChoice extends JPanel {

	

	static final long serialVersionUID = 12345;

	CKModel<String, String> _modele;
	VueEditeurCK _vue;
	
	private JButton btnPart;
	private JButton btnNewK;
	
	public PanelChoice(CKModel<String, String> modele, VueEditeurCK vue){
		
		_vue = vue;
		_modele = modele;
		
		this.setLayout(new FlowLayout(FlowLayout.CENTER));
		this.setPreferredSize(new Dimension(_vue.getFrameWidth(), _vue.getFrameHeight()/3));
		
		btnPart = new JButton("Partitioner");
		btnPart.setPreferredSize(new Dimension(200, 30));
		btnPart.addActionListener(new ControleBtnChoice(_modele, _vue));
		this.add(btnPart);
		
		btnNewK = new JButton("Ajouter connaissance");
		btnNewK.setPreferredSize(new Dimension(200, 30));
		btnNewK.addActionListener(new ControleBtnChoice(_modele, _vue));
		this.add(btnNewK);
	}

	/**
	 * @param btnPart the btnPart to set
	 */
	public void setBtnPart(JButton btnPart) {
		this.btnPart = btnPart;
	}

	/**
	 * @return the btnPart
	 */
	public JButton getBtnPart() {
		return btnPart;
	}

	/**
	 * @param btnNewK the btnNewK to set
	 */
	public void setBtnNewK(JButton btnNewK) {
		this.btnNewK = btnNewK;
	}

	/**
	 * @return the btnNewK
	 */
	public JButton getBtnNewK() {
		return btnNewK;
	}
	
}
